package com.sailfish.springbootdemo.controller.db7;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.service.db7.TbTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/TbTemplate")
public class TbTemplateController {

    @Autowired
    private TbTemplateService tbTemplateService;

    @RequestMapping("/getTbTemplateByVersion")
    public Result getTbTemplateByVersion(@RequestBody String data) {

        return tbTemplateService.getTbTemplateByVersion(data);
    }

    @RequestMapping("/createNewTemplate")
    public Result createNewTemplate(@RequestBody String data) {

        return tbTemplateService.createNewTemplate(data);
    }

    @RequestMapping("/compareTemplate")
    public Result compareTemplate(@RequestBody String data) {

        return tbTemplateService.compareTemplate(data);
    }



}
